import request from '@/utils/request'

// 查询数据采集源列表
export function listDatasource(query) {
  return request({
    url: '/dmpdatacollect/datasource/list',
    method: 'get',
    params: query
  })
}

// 查询数据采集源详细
export function getDatasource(dsId) {
  return request({
    url: '/dmpdatacollect/datasource/' + dsId,
    method: 'get'
  })
}

// 新增数据采集源
export function addDatasource(data) {
  return request({
    url: '/dmpdatacollect/datasource',
    method: 'post',
    data: data
  })
}

// 修改数据采集源
export function updateDatasource(data) {
  return request({
    url: '/dmpdatacollect/datasource',
    method: 'put',
    data: data
  })
}

// 删除数据采集源
export function delDatasource(dsId) {
  return request({
    url: '/dmpdatacollect/datasource/' + dsId,
    method: 'delete'
  })
}

// 复制数据采集源
export function copyDatasource(dsId) {
  return request({
    url: '/dmpdatacollect/datasource/copy/' + dsId,
    method: 'get'
  })
}
